package com.ruoyi.system.config;

import com.ruoyi.system.controller.SearchController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author 姚炜琦
 * @Classname EsConfig
 * @Description TODO
 * @Date 2022/10/25 21:00
 */
@Component
public class EsConfig implements ApplicationRunner {
    @Autowired
    private SearchController searchController;

    /**
     * 当启动类启动时执行当前配置类的方法
     * @param args
     * @throws Exception
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        searchController.EsHouseSync();
    }
}
